<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<title>河北省中医院预约挂号网站</title>
<link type="text/css" rel="stylesheet" href="${webPath}/css/main.css?v=3"/>
<link type="text/css" rel="stylesheet" href="${webPath}/css/common.css"/>
<link type="text/css" rel="stylesheet" href="${webPath}/jquery-ui-1.11.4/jquery-ui.min.css"/>
<script type="text/javascript" src="${webPath}/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="${webPath}/jquery-ui-1.11.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="${webPath}/js/common.js"></script>
<script type="text/javascript" src="${webPath}/js/jquery.twbsPagination.js"></script>
<script type="text/javascript">
$(function(){
	#if($!{_params.deptCode})
		// 查询当前科室的医生列表
		queryDoctors('$!{_params.deptCode}',1,'$!{_params.doctorName}');
		$("#deptList_A_$!{_params.deptCode}").addClass("active");
	#else
		// 查询所有科室的医生列表
		queryDoctors('',1,'$!{_params.doctorName}');
		$("#deptList_A_aaa_dfdf_all").addClass("active");
	#end
	
	$("a[id^='deptList_A_']").click(function(){
		
		$("a[id^='deptList_A_']").removeClass("active");
		$(this).addClass("active");
		
		var code = $(this).attr("code");
		$("#currentDeptCode").val(code); 
		$("#currentDoctorName").val("");
		queryDoctors(code,1,'');
	})
	
	
	// 展开更多科室或者收起科室
	$("#moreOrLess").click(function(){
		var height = $(".yiyuanxz_dh1 dl dd").css("height");
		var h = parseInt(height);
		if(h < 100){
			$(".yiyuanxz_dh1 dl dd").css("height","auto");
			$(this).html("收起更多>");
		}else{
			$(".yiyuanxz_dh1 dl dd").css("height","60px");
			$(this).html("展开更多>");
		}
	});
})

// 查询医生列表
function queryDoctors(deptCode,pageNo,doctorName){
	$("#doctor-info-list").html("<li class='tip'><font color='blue'>正在查找，请稍后。。。</font></li>");
	
	$.post("$!{webPath}/search/doctor/asyncDoctorDetailByDepartmentCode.htm",{deptCode:deptCode,doctorName:doctorName,pageNo:pageNo},function(data){
		$("#doctor-info-list").html(""); // 清空医生内容区
		if(data.success){
			$("#doc_total").html(data.totalLimit);
			// 设置页码信息
			setPage(data.totalPage,data.pageNum);
			
			var listEle = "";
			$.each(data.doctors, function(index, obj) {
				listEle += "<li class='doctor-info-single'>";
				listEle += "<div class='doctor-card clearfix'>";
				listEle += "<div class='info-pic'><img src='$!{webPath}/images/doctor-m.png'></div>";
				listEle += "<div class='infos'><div class='info-title'>";
				listEle += "<div>"+obj.doctor.doctorName+"</div>";
				listEle += "<span class='doctor-medtitle'>"+(obj.doctor.doctorTitleCode)+"</span>";
				listEle += "<p class='info-hospittal'>";
				listEle += "<span><a href='javascript:void(0);'>"+obj.doctor.departmentName+"</a></span>";
				listEle += "<span><a href='javascript:void(0);'>"+obj.doctor.doctorSessType+"</a></span>";
				listEle += "</p>";
						
				listEle += "</div></div>";
				
				listEle += "<div class='appointment-time'><ul>";
				
				if(obj.schedules){
					for(var n=0;n<obj.schedules.length;++n){
						var sche = obj.schedules[n];
						listEle += "<li><span class='appointment-day'>"+getWeekShotName(new Date(sche.serviceDate))+"</span><span>"+getDateShortFormat(new Date(sche.serviceDate))+"</span><span>"+sche.sessionName+"</span><a href='$!{webPath}/search/order/bookOrder.htm?deptCode="+sche.departmentCode+"&docCode="+sche.doctorCode+"&date="+sche.serviceDate+"&timeSole="+strToLetter(sche.sessionName)+"' target='_blank' class='more-time-chose'><span class='appointment-click'>立即预约</span></a></li>";
					}
					if(obj.schedules.length > 0){
						listEle += "<li><a href='$!{webPath}/search/schedule/moreDoctorSchedules.htm?deptCode="+obj.doctor.departmentCode+"&doctorCode="+obj.doctor.doctorCode+"' class='more-time-chose' target='_blank'><span style='margin:0 1px;'>更多时段&nbsp;&gt;</span></a></li>";
					}
				}
				listEle += "</ul></div>";
				
				listEle += "</div>";
				listEle += "</li>";
			});
			
			$("#doctor-info-list").html(listEle);
		}else{
			// 未查找到任何医师信息提示 
			$("#doctor-info-list").html("<li><font color='red'>未查找到任何医师信息</font></li>");
		}
	},"json");
	
}

// 设置分页信息
function setPage(totalPages,startPage){
	$("#visible-pages-doctors-p").html('<ul id="visible-pages-doctors" style="margin:0;"></ul>');
	var pageClickNum = 0;
	$("#visible-pages-doctors").twbsPagination({
        totalPages: totalPages,
        startPage : startPage,
        visiblePages: 5,
        href: 'javascript:void(0)' ,
        onPageClick : function (event, page) {
        	if(pageClickNum > 0){
        		var deptCode = $("#currentDeptCode").val();
        		var doctorName = $("#currentDoctorName").val();
        		queryDoctors(deptCode,page,doctorName)
        	}
        	pageClickNum++;
        }
    });
}
</script>
</head>
<body>
<input type="hidden" id="rootWebPath" value="$!{webPath}" />
<div class="ui-widget" id="top_alert_div" style="display:none;">
	<div class="ui-state-highlight ui-corner-all" style="border-radius:0;padding:0.7em;">
		<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
		<strong>警告!</strong>&nbsp;&nbsp;&nbsp;&nbsp;<span id="top_alert_div_msg">Sample ui-state-highlight style.</span></p>
	</div>
</div>
<!--
	<div id="dbnav">
		<div class="dbnav_context">
			<p class="dbnav_context_left"><img src="http://img.bjguahao.gov.cn/ws/1.0/hs/images/dbnav.png"><span>010-114/116114电话预约</span></p>
			<div class="top_help">
				<a href="${webPath}/search/patient/searchPatInfo.htm">患者信息查询</a>
				<a href="javascript:void(0);">帮助中心</a>
			</div>
		</div>
	</div>
-->
<div id="top">
	<div class="top_left">
		<a href="$!{webPath}/index.htm"><img src="$!{webPath}/images/logo.png">
			<h2 class="top_h2">河北省中医院预约挂号网站</h2>
		</a>
	</div>
	<div class="top_search">
		<div class="option" id="wn_h_div">
			<span id="wn_h">科室</span>
		</div>
		<div class="sbox">
			<input class="ac_input" onblur="javascript:if(this.value=='')this.value='请输入搜索内容';" onfocus="javascript:if(this.value=='请输入搜索内容')this.value='';" value="请输入搜索内容" maxlength="30" name="words" id="words" type="text">
		</div>
		<div class="sbtn">
			<input value="" style="letter-spacing: -1px;" id="top_search_btn" type="button">
		</div>
		<div id="sbArea_h" style="display:none;">
			<a target="_self" href="javascript:void(0);">
				<div class="dselObj" id="wv_h_1">科室</div>
			</a>
			<a target="_self" href="javascript:void(0);">
				<div class="dselObj" id="wv_h_2">医生</div>
			</a>
		</div>
	</div>
</div>
<div id="index_nav_border">
	<div id="index_nav">
		<ul class="index_nav_ul">
			<li><a href="$!{webPath}/search/department/findAllDepartment.htm">全部科室</a></li>
			<li><a href="${webPath}/search/schedule/department.htm">科室排班</a></li>
			<li class="index_nav_lic"><a href="$!{webPath}/search/doctor/deptDoctorList.htm">科室医生</a></li>
		</ul>
		<div class="index_nav_right">
			<a target="_blank" href="$!{webPath}/search/order/queryOrder.htm">预约记录查询</a>
		</div>
	</div>
</div>
<div id="yiyuanxz_dh">
	<div class="yiyuanxz_dh1">
		<dl class="yiyuanxz_dh1_dl">
			<dt style="width:132px;border-right: 1px solid #dcdddd;"><span>科室选择</span><a id="deptList_A_aaa_dfdf_all" href="javascript:void(0);" code="" class="yiyuanxz_dt_all">全部</a></dt>
			<dd>
				#foreach($dept in $allDepts)
					<li><a href="javascript:void(0);" id="deptList_A_$!{dept.departmentCode}" code="$!{dept.departmentCode}">$!{dept.departmentName}</a></li>
				#end
			</dd>
		</dl>
		<div class="more-con" style="padding-left:159px;"><a id="moreOrLess" href="javascript:void(0);">展开更多&gt;</a></div>
	</div>
</div>
<!-- 隐藏域，当前科室，医生姓名 -->
<input type="hidden" id="currentDeptCode" value="$!{_params.deptCode}" />
<input type="hidden" id="currentDoctorName" value="$!{_params.doctorName}" />

<div class="doctor-info-box">
	<h4>符合条件的 <label class="curdotor"><em id="doc_total">0</em></label> 名优质医生</h4>
	<ul id="doctor-info-list" class="doctor-info-list" style="display:block"></ul>
	<div class="pagination-x pull-right">
		<span class="pagers" id="visible-pages-doctors-p"></span>
	</div>
</div>

<div class="footer-box clear path">
	<div class="footer-img-box">
		<div class="footer-img-left">
			<img src="${webPath}/images/logo.png" style="width:60px; height:auto; float:left">
			<ul style="padding-top:20px;float:left; padding-left:20px;">
				<li><span class="phone">0311-69095114</span></li>
				<li><span class="mail">时间：8:00-18:00</span></li>
				
			</ul>
		</div>
		<ul class="footer-img-right">
			<li class="image-hospital">
			<p>
				友情连接：
			</p>
			<ul>
				<li>
					<a title="网站名称：中健网网站地址：http://www.59120.com网站简介：综合健康网。" target="_blank" href="http://www.59120.com">中健网</a>
				</li>
				<li>
					<a title="网站名称：花讯网网站地址：http://www.flowercn.net网站简介：花卉资讯第一站。" target="_blank" href="http://www.flowercn.net">花讯网</a>
				</li>
				
				<li>
					<a title="网站名称：卫生部
网站地址：http://www.moh.gov.cn/
网站简介：卫生部" target="_blank" href="http://www.moh.gov.cn/">卫生部</a>
				</li>
				<li>
					<a title="网站名称：中医药管理局
网站地址：http://www.satcm.gov.cn/
网站简介：中医药管理局" target="_blank" href="http://www.satcm.gov.cn/">中医药管理局</a>
				<li>
					<a title="网站名称：胸科医院
网站地址：http://www.hbsxkyy.com/
网站简介：" target="_blank" href="http://www.hbsxkyy.com/">胸科医院</a>
				</li>
				<li>
					<a title="网站名称：河北医科大学
网站地址：http://www.hebmu.edu.cn/
网站简介：河北医科大学" target="_blank" href="http://www.hebmu.edu.cn/">河北医科大学</a>
				</li>
				<li>
					<a title="网站名称：河北医大二院
网站地址：http://www.hb2h.he.cninfo.net/
网站简介：河北医科大学第二医院" target="_blank" href="http://www.hb2h.he.cninfo.net/">河北医大二院</a>
				</li>
				<li>
					<a title="网站名称：河北医大三院
网站地址：http://www.cthhmu.com/main/index.aspx
网站简介：河北医科大学第三医院" target="_blank" href="http://www.cthhmu.com/main/index.aspx">河北医大三院</a>
				</li>
				<li>
					<a title="网站名称：河北医大四院
网站地址：http://www.hbydsy.com/
网站简介：河北医科大学第四医院" target="_blank" href="http://www.hbydsy.com/">河北医大四院</a>
				</li>
				<li>
					<a title="网站名称：河北省口腔医院
网站地址：http://www.hebmu.edu.cn/kqyx-1.htm
网站简介：河北医科大学口腔医院" target="_blank" href="http://www.hebmu.edu.cn/kqyx-1.htm">河北省口腔医院</a>
				</li>
				<li>
					<a title="网站名称：河北医大一院
网站地址：http://www.jyyy.com.cn/
网站简介：河北医科大学第一医院" target="_blank" href="http://www.jyyy.com.cn/">河北医大一院</a>
				</li>
				<li>
					<a title="网站名称：河北省卫生厅
网站地址：http://www.hebwst.gov.cn/
网站简介：河北省卫生厅" target="_blank" href="http://www.hebwst.gov.cn/">河北省卫生厅</a>
				</li>
				<li>
					<a title="网站名称：河北省药监局
网站地址：http://www.hebfda.gov.cn/
网站简介：河北省食品药品监督管理局" target="_blank" href="http://www.hebfda.gov.cn/">河北省药监局</a>
				</li>
				<li>
					<a title="网站名称：河北中医学院
网站地址：http://www.hbcmc.edu.cn/
网站简介：河北中医学院" target="_blank" href="http://www.hbcmc.edu.cn/">河北中医学院</a>
			</ul>
			</li>
			
		</ul>
	</div>
	
</div>
</body>
</html>